package com.xxx.meter.ui.info;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.xxx.meter.R;
import com.xxx.meter.base.BaseActivity;
import com.xxx.meter.model.utils.ButtonUtil;
import com.xxx.meter.ui.info.web.InfoFindWebActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class InfoActivity extends BaseActivity {

    @BindView(R.id.main_title)
    TextView mTitle;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_info;
    }

    @Override
    protected void initData() {
        mTitle.setText("信息查询");
    }

    @OnClick({R.id.main_return, R.id.info_1, R.id.info_2, R.id.info_3, R.id.info_4, R.id.info_5})
    public void OnClick(View view) {
        if (ButtonUtil.isFastClick()) return;
        switch (view.getId()) {
            case R.id.main_return:
                finish();
                break;
            case R.id.info_1:
                Intent intent = new Intent(this, InfoDeviceActivity.class);
                intent.putExtra("title", "设备资料");
                intent.putExtra("type", 1);
                startActivity(intent);
                break;
            case R.id.info_2:
                Intent intent1 = new Intent(this, InfoDeviceActivity.class);
                intent1.putExtra("title", "巡机数据");
                startActivity(intent1);
                break;
            case R.id.info_3:
                Intent intent2 = new Intent(this, InfoFindWebActivity.class);
                intent2.putExtra("title", "规章制度");
                intent2.putExtra("type", 2);
                startActivity(intent2);
                break;
            case R.id.info_4:
                startActivity(new Intent(this, InfoWorkActivity.class));
                break;
            case R.id.info_5:
                startActivity(new Intent(this, PatrolRecordActivity.class));
                break;
        }
    }

}
